<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>商品页面</title>

    <link href="/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css"/>
    <link href="/basic/css/demo.css" rel="stylesheet" type="text/css"/>
    <link type="text/css" href="/css/optstyle.css" rel="stylesheet"/>
    <link type="text/css" href="/css/style.css" rel="stylesheet"/>
    <link type="text/css" href="/css/hmstyle.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">

    <script type="text/javascript" src="/basic/js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="/basic/js/quick_links.js"></script>

    <script type="text/javascript" src="/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
    <script type="text/javascript" src="/js/jquery.imagezoom.min.js"></script>
    <script type="text/javascript" src="/js/jquery.flexslider.js"></script>
    <script type="text/javascript" src="/js/list.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/js/common.js"  type="text/javascript"></script>

</head>

<body>


<th:block th:include="header"/>

<script type="text/javascript">
    $(function () {
    });
    $(window).load(function () {
        $('.flexslider').flexslider({
            animation: "slide",
            start: function (slider) {
                $('body').removeClass('loading');
            }
        });
    });
</script>
<div class="scoll">
    <section class="slider">
        <div class="flexslider">
            <ul class="slides">
                <li>
                    <img src="/images/01.jpg" title="pic"/>
                </li>
                <li>
                    <img src="/images/02.jpg"/>
                </li>
                <li>
                    <img src="/images/03.jpg"/>
                </li>
            </ul>
        </div>
    </section>
</div>

<!--放大镜-->

<div class="item-inform">
    <div class="clearfixLeft" id="clearcontent">

        <div class="box">
            <script type="text/javascript">
                $(document).ready(function () {
                    $(".jqzoom").imagezoom();
                    $("#thumblist li a").click(function () {
                        $(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
                        $(".jqzoom").attr('src', $(this).find("img").attr("mid"));
                        $(".jqzoom").attr('rel', $(this).find("img").attr("big"));
                    });
                });
            </script>

            <div class="tb-booth tb-pic tb-s310">
                <a th:href="${introductionProduct1.get(0).imagePath}"><img th:src="${introductionProduct1.get(0).imagePath}" alt="细节展示放大镜特效"
                                              class="jqzoom"/></a>
            </div>
            <ul class="tb-thumb" id="thumblist">
                <li class="tb-selected">
                    <div class="tb-pic tb-s40">
                        <a href="#"><img th:src="${introductionProduct1.get(0).imagePath}"></a>
                    </div>
                </li>
                <li>
                    <div class="tb-pic tb-s40">
                        <a href="#"><img th:src="${introductionProduct1.get(0).imagePath}" th:mid="${introductionProduct1.get(0).imagePath}" th:big="${introductionProduct1.get(0).imagePath}"></a>
                    </div>
                </li>
                <li>
                    <div class="tb-pic tb-s40">
                        <a href="#"><img th:src="${introductionProduct1.get(0).imagePath}" th:mid="${introductionProduct1.get(0).imagePath}" th:big="${introductionProduct1.get(0).imagePath}"></a>
                    </div>
                </li>
            </ul>
        </div>

        <div class="clear"></div>
    </div>

    <div class="clearfixRight">

        <!--规格属性-->
        <!--名称-->
        <div class="tb-detail-hd">
            <h1 th:text="${introductionProduct1.get(0).title}"></h1>
        </div>
        <div class="tb-detail-list">
            <!--价格-->
            <div class="tb-detail-price">
                <li class="price iteminfo_price">
                    <dt>促销价</dt>
                    <dd><em>¥</em><b class="sys_item_price">[[${introductionProduct1.get(0).price}]]</b></dd>
                </li>
                <div class="clear"></div>
            </div>

            <!--地址-->
<!--            <dl class="iteminfo_parameter freight">-->
<!--                <dt>配送至</dt>-->
<!--                <div class="iteminfo_freprice">-->
<!--                    <div class="am-form-content address">-->
<!--                        <select data-am-selected>-->
<!--                            <option value="a">浙江省</option>-->
<!--                            <option value="b">湖北省</option>-->
<!--                        </select>-->
<!--                        <select data-am-selected>-->
<!--                            <option value="a">温州市</option>-->
<!--                            <option value="b">武汉市</option>-->
<!--                        </select>-->
<!--                        <select data-am-selected>-->
<!--                            <option value="a">瑞安区</option>-->
<!--                            <option value="b">洪山区</option>-->
<!--                        </select>-->
<!--                    </div>-->

<!--                </div>-->
<!--            </dl>-->
            <div class="clear"></div>

            <!--销量-->
            <ul class="tm-ind-panel">
                <li class="tm-ind-item tm-ind-sellCount canClick">
                    <div class="tm-indcon"><span class="tm-label">月销量</span><span class="tm-count">1015</span></div>
                </li>
                <li class="tm-ind-item tm-ind-sumCount canClick">
                    <div class="tm-indcon"><span class="tm-label">累计销量</span><span class="tm-count">6015</span>
                    </div>
                </li>
                <li class="tm-ind-item tm-ind-reviewCount canClick tm-line3">
                    <div class="tm-indcon"><span class="tm-label">累计评价</span><span class="tm-count">640</span></div>
                </li>
            </ul>
            <div class="clear"></div>

            <!--各种规格-->
            <dl class="iteminfo_parameter sys_item_specpara">
                <dt class="theme-login">
                    <div class="cart-title">可选规格<span class="am-icon-angle-right"></span></div>
                </dt>
                <dd>
                    <!--操作页面-->

                    <div class="theme-popover-mask"></div>

                    <div class="theme-popover">
                        <div class="theme-span"></div>
                        <div class="theme-poptit">
                            <a href="javascript:;" title="关闭" class="close">×</a>
                        </div>
                        <div class="theme-popbod dform">
                            <form class="theme-signin" id="form1"  action='' method="">

                                <div class="theme-signin-left">

                                    <div class="theme-options">
                                        <div class="cart-title">口味</div>
                                        <ul>
                                            <li class="sku-line selected">[[${introductionProduct1.get(0).taste}]]<i></i></li>

                                        </ul>
                                    </div>
                                    <div class="theme-options">
                                        <div class="cart-title">包装</div>
                                        <ul>
                                            <li class="sku-line selected">[[${introductionProduct1.get(0).packages}]]<i></i></li>

                                        </ul>
                                    </div>
                                    <div class="theme-options">
                                        <div class="cart-title number">数量</div>
                                        <dd>
                                            <input id="min" class="am-btn am-btn-default" name="" type="button"
                                                   value="-"/>
                                            <input id="text_box"  name="text_box"  type="text" value="1" style="width:30px;"/>
                                            <input id="add" class="am-btn am-btn-default" name="" type="button"
                                                   value="+"/>
                                            <span class="tb-hidden">库存<span class="stock">1000</span>件</span>
                                        </dd>

                                    </div>
                                    <div class="clear"></div>

                                    <div class="btn-op">
                                        <div class="btn am-btn am-btn-warning">确认</div>
                                        <div class="btn close am-btn am-btn-warning">取消</div>
                                    </div>
                                </div>
                                <div class="theme-signin-right">
                                    <div class="img-info">
                                        <img src="/images/songzi.jpg"/>
                                    </div>
                                    <div class="text-info">
                                        <span class="J_Price price-now">¥39.00</span>
                                        <span id="Stock" class="tb-hidden">库存<span class="stock">1000</span>件</span>
                                    </div>
                                </div>

<!--                                <div class="pay" >-->
<!--                                    <li>-->
<!--                                            <div class="clearfix tb-btn tb-btn-buy theme-login">-->
<!--&lt;!&ndash;                                                <a id="LikBasket1" title="立即结算"  th:href="'/pay/buyNow/'+${introductionProduct1.get(0).id}"><i></i>立即结算</a>&ndash;&gt;-->
<!--                                                <a id="LikBasket2" title="立即结算" th:pid="${introductionProduct1.get(0).id}" href="javascript:;"><i></i>立即结算</a>-->
<!--                                            </div>-->
<!--                                    </li>-->
<!--                                    <li>-->
<!--                                        <div class="clearfix tb-btn tb-btn-basket theme-login">-->
<!--                                            <a id="LikBasket" title="加入购物车" th:pid="${introductionProduct1.get(0).id}" href="javascript:;"><i></i>加入购物车</a>-->
<!--                                        </div>-->
<!--                                    </li>-->

<!--                                </div>-->

                            </form>
                        </div>
                    </div>

                </dd>
            </dl>
            <div class="clear"></div>
            <!--活动	-->
            <div class="shopPromotion gold">
                <div class="hot">
                    <dt class="tb-metatit">店铺优惠</dt>
                    <div class="gold-list">
                        <p>详情优惠请关注店铺！
                    </div>
                </div>
                <div class="clear"></div>

            </div>
        </div>
        <div class="pay" >
            <li>
                <div class="clearfix tb-btn tb-btn-buy theme-login">
                    <a id="LikBasket1" title="立即结算"  th:href="'/pay/buyNow/'+${introductionProduct1.get(0).id}"><i></i>立即结算</a>
                    <!-- <a id="LikBasket2" title="立即结算" th:pid="${introductionProduct1.get(0).id}" href="javascript:;"><i></i>立即结算</a>-->
                </div>
            </li>
            <li>
                <div class="clearfix tb-btn tb-btn-basket theme-login">
                    <a id="LikBasket" title="加入购物车" th:pid="${introductionProduct1.get(0).id}" href="javascript:;"><i></i>加入购物车</a>
                </div>
            </li>

        </div>


    </div>

    <div class="clear"></div>

</div>


<!-- introduce-->

<div class="introduce">
    <div class="browse">
        <div class="mc">

        </div>
    </div>
    <div class="introduceMain">
        <div class="am-tabs" data-am-tabs>
            <ul class="am-avg-sm-3 am-tabs-nav am-nav am-nav-tabs">
                <li class="am-active">
                    <a href="#">

                        <span class="index-needs-dt-txt">产品介绍</span></a>

                </li>

            </ul>

            <div class="am-tabs-bd">

                <div class="am-tab-panel am-fade am-in am-active">
                    <div class="J_Brand">

                        <div class="attr-list-hd tm-clear">
                            <h4>产品参数：</h4></div>
                        <div class="clear"></div>
                        <ul id="J_AttrUL">
                            <li title="">产品类型:&nbsp;烘炒类</li>
                            <li title="">原料产地:&nbsp;巴基斯坦</li>
                            <li title="">产地:&nbsp;湖北省武汉市</li>
                            <li title="">配料表:&nbsp;进口松子、食用盐</li>
                            <li title="">产品规格:&nbsp;210g</li>
                            <li title="">保质期:&nbsp;180天</li>
                            <li title="">产品标准号:&nbsp;GB/T 22165</li>
                            <li title="">生产许可证编号：&nbsp;QS4201 1801 0226</li>
                            <li title="">储存方法：&nbsp;请放置于常温、阴凉、通风、干燥处保存</li>
                            <li title="">食用方法：&nbsp;开袋去壳即食</li>
                        </ul>
                        <div class="clear"></div>
                    </div>

                    <div class="details">
                        <div class="attr-list-hd after-market-hd">
                            <h4>产品细节</h4>
                        </div>
                        <div class="twlistNews" th:each="i1:${introductionProduct1}">

                            <img th:src="${i1.detailImg}"/>
<!--                            <img src="/images/tw2.jpg"/>-->
<!--                            <img src="/images/tw3.jpg"/>-->
<!--                            <img src="/images/tw4.jpg"/>-->
<!--                            <img src="/images/tw5.jpg"/>-->
<!--                            <img src="/images/tw6.jpg"/>-->
<!--                            <img src="/images/tw7.jpg"/>-->
                        </div>
                    </div>
                    <div class="clear"></div>

                </div>


            </div>

        </div>

        <div class="clear"></div>


        <th:block th:include="footer"/>


        <!--菜单 -->
        <div class=tip>
            <div id="sidebar">
                <div id="wrap">
                    <div id="prof" class="item">
                        <a href="#">
                            <span class="setting"></span>
                        </a>
                        <div class="ibar_login_box status_login">
                            <div class="avatar_box">
                                <p class="avatar_imgbox"><img src=""/></p>
                                <ul class="user_info">
                                    <li>用户名：sl1903</li>
                                    <li>级&nbsp;别：普通会员</li>
                                </ul>
                            </div>
                            <div class="login_btnbox">
                                <a href="#" class="login_order">我的订单</a>
                                <a href="#" class="login_favorite">我的收藏</a>
                            </div>
                            <i class="icon_arrow_white"></i>
                        </div>

                    </div>
                    <div id="shopCart" class="item">
                        <a href="#">
                            <span class="message"></span>
                        </a>
                        <p>
                            购物车
                        </p>
                        <p class="cart_num"></p>
                    </div>


                    <div class="quick_toggle">
                        <!--二维码 -->
                        <li class="qtitem">
                            <a href="#none"><span class="mpbtn_qrcode"></span></a>
                            <div class="mp_qrcode" style="display:none;"><img src="/images/weixin_code_145.png"/><i
                                    class="icon_arrow_white"></i></div>
                        </li>
                        <li class="qtitem">
                            <a href="#top" class="return_top"><span class="top"></span></a>
                        </li>
                    </div>

                    <!--回到顶部 -->
                    <div id="quick_links_pop" class="quick_links_pop hide"></div>

                </div>

            </div>
            <div id="prof-content" class="nav-content">
                <div class="nav-con-close">
                    <i class="am-icon-angle-right am-icon-fw"></i>
                </div>
                <div>
                    我
                </div>
            </div>
            <div id="shopCart-content" class="nav-content">
                <div class="nav-con-close">
                    <i class="am-icon-angle-right am-icon-fw"></i>
                </div>
                <div>
                    购物车
                </div>
            </div>
            <div id="asset-content" class="nav-content">
                <div class="nav-con-close">
                    <i class="am-icon-angle-right am-icon-fw"></i>
                </div>
            </div>
            <div id="foot-content" class="nav-content">
                <div class="nav-con-close">
                    <i class="am-icon-angle-right am-icon-fw"></i>
                </div>
                <div>
                    足迹
                </div>
            </div>
            <div id="brand-content" class="nav-content">
                <div class="nav-con-close">
                    <i class="am-icon-angle-right am-icon-fw"></i>
                </div>
                <div>
                    收藏
                </div>
            </div>

        </div>
    </div>
</div>




<script>
    layui.use(["layer"],function (){
        var layer = layui.layer;
        var $ = layui.jquery;
        $("#LikBasket").on("click",function (){
            var count = $("#text_box").val();
            $.post("/cart/save",{pId:$(this).attr("pid"),count:count},function(){
                layer.msg("加入成功！");
            })
        });
        $("#payBtn").on("click",function (){
            var count = $("#text_box").val();
            $.post("/cart/save",{pId:$(this).attr("pid"),count:count},function(){
                // $("#form1").submit();
            })
        });
        $("#LikBasket2").on("click",function (){
                $("#form1").submit();
        });

    });


</script>
</body>

</html>